<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" lang="zh-CN">

<div th:fragment="content">
    <div class="form-group">
        <label class="col-sm-2 control-label">帐号 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4">
            <input class="form-control" name="username" type="text" maxlength="32" dbsyncer-valid="require" placeholder="root" th:value="${connector?.config?.username}"/>
        </div>
        <label class="col-sm-2 control-label">密码 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4 ">
            <input class="form-control" name="password" type="password" maxlength="32" dbsyncer-valid="require" th:value="${connector?.config?.password}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">URL <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-10">
            <textarea name="url" class="form-control" maxlength="1024" dbsyncer-valid="require" rows="5" th:text="${connector?.config?.url} ?: 'jdbc:mysql://127.0.0.1:3306/test?rewriteBatchedStatements=true&useUnicode=true&amp;characterEncoding=UTF8&amp;serverTimezone=Asia/Shanghai&amp;useSSL=false&amp;verifyServerCertificate=false&amp;autoReconnect=true&amp;failOverReadOnly=false'"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">驱动 </label>
        <div class="col-sm-10">
            <select id="driverClassName" class="form-control select-control" name="driverClassName">
                <option value="com.mysql.jdbc.Driver" th:selected="${connector?.config?.driverClassName eq 'com.mysql.jdbc.Driver'}">com.mysql.jdbc.Driver</option>
                <option value="com.mysql.cj.jdbc.Driver" th:selected="${connector?.config?.driverClassName eq 'com.mysql.cj.jdbc.Driver'}">com.mysql.cj.jdbc.Driver</option>
            </select>
        </div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    // 初始化select插件
    initSelectIndex($("#driverClassName"), 1);
})
</script>
</html>